package cn.tedu.medicalpath.inspectionItem.controller;

import cn.tedu.medicalpath.base.response.JsonResult;
import cn.tedu.medicalpath.inspectionItem.pojo.dto.InspectionItemQuery;
import cn.tedu.medicalpath.inspectionItem.pojo.vo.InspectionItemVO;
import cn.tedu.medicalpath.inspectionItem.service.InspectionItemService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/v1/inspection/item")
public class InspectionItemController {
    @Autowired
    private InspectionItemService inspectionItemService;
    @GetMapping("/select")
    public JsonResult select(InspectionItemQuery inspectionItemQuery){
        log.debug("开始处理-【查询检查项目】的请求-入参：{}",inspectionItemQuery);
        List<InspectionItemVO> data=inspectionItemService.select(inspectionItemQuery);
        log.debug("查询检查项目成功，结果集：{}",data);
        return JsonResult.success(data);
    }
}
